<?php

namespace backend\models\odm;

use Yii;

/**
 * This is the model class for table "xs_tweet".
 *
 * @property string $id
 * @property string $tweet_sn
 * @property integer $op_id
 * @property string $op_name
 * @property string $channel_name
 * @property integer $channel_id
 * @property string $title_id
 * @property string $img_url
 * @property integer $is_force_focus_wechat
 * @property string $is_force_focus_chapter
 * @property integer $status
 * @property integer $novel_id
 * @property string $novel_name
 * @property integer $chapter_id
 * @property integer $platform
 * @property string $create_time
 * @property string $update_time
 */
class TweetOdm extends \yii\db\ActiveRecord
{
    /**
     * @inheritdoc
     */
    public static function tableName()
    {
        return 'xs_tweet';
    }

    /**
     * @inheritdoc
     */
    public function rules()
    {
        return [
            [['op_id', 'channel_id', 'is_force_focus_wechat', 'status', 'novel_id', 'chapter_id', 'platform'], 'integer'],
            [['create_time', 'update_time'], 'safe'],
            [['tweet_sn', 'img_url'], 'string', 'max' => 200],
            [['op_name', 'title_id'], 'string', 'max' => 60],
            [['channel_name', 'novel_name'], 'string', 'max' => 80],
            [['is_force_focus_chapter'], 'string', 'max' => 300],
        ];
    }

    /**
     * @inheritdoc
     */
    public function attributeLabels()
    {
        return [
            'id' => Yii::t('app', '推文id'),
            'tweet_sn' => Yii::t('app', '推广编号'),
            'op_id' => Yii::t('app', '合作方id'),
            'op_name' => Yii::t('app', '合作方名称'),
            'channel_name' => Yii::t('app', '渠道名称'),
            'channel_id' => Yii::t('app', '渠道id'),
            'title_id' => Yii::t('app', '标题'),
            'img_url' => Yii::t('app', '推文图片'),
            'is_force_focus_wechat' => Yii::t('app', '是否强制关注微信公共号 1是 0否'),
            'is_force_focus_chapter' => Yii::t('app', '是否强制关注章节'),
            'status' => Yii::t('app', '状态[0:待完善,1:可推,2已推荐]'),
            'novel_id' => Yii::t('app', '小说id'),
            'novel_name' => Yii::t('app', '小说名称'),
            'chapter_id' => Yii::t('app', '章节id'),
            'platform' => Yii::t('app', '平台 1微信 2微博 3APP 4 其他'),
            'create_time' => Yii::t('app', '创建时间'),
            'update_time' => Yii::t('app', '修改时间'),
        ];
    }
}
